package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Role;
import cn.wolfcode.queryobject.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int delete(Long id);

    int insert(Role record);

    Role selectOne(Long id);

    List<Role> selectAll();

    int update(Role record);



    List<Role> queryForList(QueryObject qo);

    // 插入中间表的方法
    void insertRelation(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);

    // 删除中间表的数据(一个角色对应多个权限)
    void deleteRelation(Long roleId);

    List<String> selectSnByEmpId(Long id);
}